<div class="container">
    <div class="page-header">
        <h1>{if $id}Редактирование{else}Добавление{/if} пользователя</h1>
    </div>
    <div class="row">
        {if $errors.duplicate}
            <div class="alert alert-error">{$errors.duplicate}</div>
        {/if}
    	<form action="{$cururl}" method="post" class="form-horizontal">
        	<fieldset>
        	    <div class="control-group{if $errors.login} error{/if}">
                    <label for="login" class="control-label">Логин</label>
                    <div class="controls">
                        <input type="text" name="login" id="login" class="input-xlarge" value="{$aData.login}">
                        <p class="help-block{if !$errors.login} invisible{/if}">{$errors.login|default:'&nbsp;'}</p>
                    </div>
                </div>
                <div class="control-group{if $errors.password} error{/if}">
                    <label for="password" class="control-label">Пароль</label>
                    <div class="controls">
                        <input type="text" name="password" id="password" class="input-xlarge" value="{$aData.password}">
                        <p class="help-block{if !$errors.password} invisible{/if}">{$errors.password|default:'&nbsp;'}</p>
                    </div>
                </div>
                <div class="control-group{if $errors.name} error{/if}">
                    <label for="name" class="control-label">Имя</label>
                    <div class="controls">
                        <input type="text" name="name" id="name" class="input-xlarge" value="{$aData.name}">
                        <p class="help-block{if !$errors.name} invisible{/if}">{$errors.name|default:'&nbsp;'}</p>
                    </div>
                </div>
                <div class="control-group{if $errors.utype} error{/if}">
                    <label for="utype" class="control-label">Тип</label>
                    <div class="controls">
                        <select name="utype" id="utype" class="input-xlarge">
                            <option value="">-- Выберите --</option>
                            {foreach from=$aUserTypes key=key item=item}
                            <option value="{$key}"{if $aData.utype == $key} selected{/if}>{$item}</option>
                            {/foreach}
                        </select>
                        <p class="help-block{if !$errors.utype} invisible{/if}">{$errors.utype|default:'&nbsp;'}</p>
                    </div>
                </div>
                <div class="form-actions">
                    <button class="btn btn-success" type="submit">
                        <i class="icon-{if $id}edit{else}plus{/if} icon-white"></i> {if $id}Редактировать{else}Добавить{/if}</button>
                </div>
        	</fieldset>
    	</form>
    </div>
</div>